Technology Blogs by Members
Explore a vibrant mix of technical expertise, industry insights, and tech buzz in member blogs covering SAP products, technology, and events. Get in the mix!
Showing results for 
Search instead for 
Did you mean: 
Former Member
0 Kudos

   Many PowerBuilder application developers have often asked me if PB has the ability to handle online payments. Now if you also use Appeon Mobile with your PowerBuilder IDE, Appeon Corporation has recently added an API to their Appeon Mobile 2015 product which enables developers to add code to directly interact with the PayPal system!. This feature takes advantage of the already numerous iOS, SDK, APIs, and Android SDK APIs to access the native features of the target mobile device that you can invoke from your mobile PB application via Appeon.

    Below is the sample code for making an online payment from your mobile PowerBuilder application via PayPal ....

------------------------------------ PayPal code snippet ------------------------------------

eon_mobile_paymentex lnv_payment
eon_mobile_str_paymentinit lstr_paymentinit
eon_mobile_str_paymentsubmit lstr_paymentsubmit
integer li_re

  lnv_payment = create eon_mobile_paymentex

  //bind oe_paymentok, oe_paymentcancel, oe_paymentfailed, and oe_error events of lnv_payment with
//ue_paymentok, ue_paymentcancel, ue_paymentfailed, and ue_error events of the parent window.
lnv_payment.of_register ( parent, "ue_paymentok", "ue_paymentcancel", "ue_paymentfailed", "ue_error")

  //initialize platform

  //initialize payment
lstr_paymentinit.s_clientid = "AXMNlBBgmfChHPgrMAtrrdTtkWk52THb9Hl54uZ6vASDWSOll8"
li_re = lnv_payment.of_init (lstr_paymentinit)

  if li_re = 1 then
//submit payment
lstr_paymentsubmit.dbl_countmoney = 9.99
lstr_paymentsubmit.s_currency = "USD"
lstr_paymentsubmit.s_productname = "shoes"

li_re = lnv_payment.of_submit (lstr_paymentsubmit)
if li_re = 1 then
MessageBox ("","Payment is successful!")
MessageBox ("","Payment failed!")
end if
MessageBox("","Failed to initialize payment!")
end if

  destroy lnv_payment


Now is that not "Kool"?  

1 Comment
Labels in this area