Hi Oliver,
How do you manage the callback (that is, the IPN or Payment
Notification) from Paypal?
I don't see nothing in your code for that.
What if the user cancels (or does not validate) the payment?
TIA
Jean-Luc Arnaud
Le 15/04/2015 12:37, Oliver Osswald a écrit :
> I have implemented DynaPDF in XojoScript and like that we are creating
> invoices with a link to Paypal on it. The PDF invoice is then sent by using a
> CURLSMBS class. One can create a weblink which includes an invoice-number and
> Paypal is controlling that the same invoice is not getting paid twice, plus
> is then sending back that invoice-number with the payment. For us this works
> quite nicely.
>
> You must dig into the MBS example projects to find out more about it.
>
> To give you an idea, I can just post my XojoScript code here, which creates
> the Paypal link on the PDF invoice:
> (pdf.Weblink is a DynaPDF method to insert a web link onto the current open
> page)
>
> // ***************** BEGIN PAYPAL
> **********************************************
> If GetPropertyBool("PayPalAllow") Then
> If val(totalcost)>0.0 Then
> // Localized texts
> Dim txPayPal As String
> Dim payPalItem As String
> Select Case language
> Case "D"
> txPayPal = "mit PayPal bezahlen"
> payPalItem = "Seminar : "
> Case "F"
> txPayPal = "payez avec PayPal"
> payPalItem = "séminaire : "
> Else
> txPayPal = "pay with PayPal"
> payPalItem = "seminar : "
> End
> payPalItem = payPalItem + GetText("imTF_evt_Linkbox",id_evt)
>
> // PayPal option
> Dim url As String = "https://www.paypal.com/xclick/"
> Dim business As String = "business=" + GetProperty("PayPalEmail")
> Dim amount As String = "&amount=" + totalcostHigh + "." + totalcostLow
> Dim currency_code As String = "¤cy_code=" + IsCurrency // CHF or EUR
> Dim item_name As String = "&item_name=" + Urlencode(payPalItem)
> Dim item_number As String = "&item_number=" + UrlEncode(invoicenumber)
> Dim invoice As String = "&invoice=" + Urlencode(invoicenumber)
> Dim no_note As String = "&no_note=" + "0"
> Dim no_shipping As String = "&no_shipping=" + "1"
>
> // Define Payment Link
> url = url + business + amount + currency_code + item_name + item_number +
> invoice + no_note + no_shipping
>
> Dim PayPalLeft As Integer = 415.0
>
> // Textcolor of PayPal weblink
> Dim colorstring As String = "&c6B000100" // default is black "&c00000000",
> light blue: &c009FE300"
> Call PdfSetStrokeColor(colorstring)
> Call PdfSetFillColor(colorstring)
> Call PdfWriteText(PayPalLeft,y,txPayPal)
>
> // Framecolor of PayPal weblink
> colorstring = "&cFFCC6600"
> Call PdfSetStrokeColor(colorstring)
> Call PdfSetFillColor(colorstring)
> Call PdfWebLink(PayPalLeft-2,y,pdfgetTextWidth(txPayPal)+ 4,16.0,url)
>
> End If // val(totalcost)>0.0
> End If // GetPropertyBool("PayPalAllow")
> // ******************* END PAYPAL
> **********************************************
>
>
>
>> On 15.04.2015, at 11:30, Jean-Luc Arnaud <[email protected]> wrote:
>>
>> Hi all,
>>
>> I'd like to use Paypal from my Desktop app, offering the customer to buy
>> some licences.
>> On Internet, I found a cUrl example:
>> https://developer.paypal.com/docs/integration/web/web-checkout/
>>
>> But I'd like to know if someone wrote some code about that and could
>> share it.
>> In addition, could you, MBS gurus, confirm that MBS CURL plugin really
>> matches my need?
>>
>> TIA for any help.
>>
>> --
>> Jean-Luc Arnaud
>>
>>
>> _______________________________________________
>> Mbsplugins_monkeybreadsoftware.info mailing list
>> [email protected]
>> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
> _______________________________________________
> Mbsplugins_monkeybreadsoftware.info mailing list
> [email protected]
> https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info
_______________________________________________
Mbsplugins_monkeybreadsoftware.info mailing list
[email protected]
https://ml01.ispgateway.de/mailman/listinfo/mbsplugins_monkeybreadsoftware.info