Paypal Recurring Payment Negative Testing - testing

I am developing recurring payments using PayPal Pro and the NVP APIs. I have read here: https://www.paypalobjects.com/webstatic/en_US/developer/docs/pdf/pp_payflowpro_recurringbilling_guide.pdf that negative testing should work with recurring payments. I have my profile setup to allow for negative testing.
I am looking cause my initial payment to fail. To do this I have set my AMT and INITAMT to 2010. According to the documentation, I thought this would cause a payment failure, but instead the initial payment is successful.
Has anyone got negative testing with recurring payments to work? For either the scheduled payment or the initial Payment? If so, could you please provide any steps and/or tips?
Thanks!

Try this:
PARTNER=PayPal
PWD=yourpass
VENDOR=yourvendor
USER=youruser
ACTION=A
TENDER=C
ACCT=5105105105105100
EXPDATE=0115
TRXTYPE=R
PROFILENAME=MonthlySubscription
AMT=50000
START=12122013
PAYPERIOD=MONT
TERM=12
OPTIONALTRX=S
OPTIONALTRXAMT=2000.00
COMMENT1=First Time Customer
Having the OPTIONALTRXAMT=2000 will trigger a decline, or any code you need.

Related

Binance API transaction history

I am trying to display a users transaction history in binance, including fund deposits and withdrawals as well as buying and selling of different crypto's. Does anyone know which binance API endpoints I would use to do this? It seems quite complicated in comparison to other trading platforms.
Thanks
This is the link to the docs: https://binance-docs.github.io/apidocs/spot/en/#withdraw-history-supporting-network-user_data
I can see the Wallet endpoints "Withdraw" and "Deposit", but this won't cover crypto trading will it?, The account trade list call would be ideal, but it requires a symbol input which I'm not sure how I would obtain dynamically.
I would also like this endpoint to provide me with the data so I can get the avg buy price for a crypto
Currently this is not supported. See: https://dev.binance.vision/t/fetch-all-account-orders/279/3
This is the route you're looking for to get the user trade history. The big downside is that you have to specify the exchange symbol, you cannot get the history of the account with just one request:
https://binance-docs.github.io/apidocs/spot/en/#account-trade-list-user_data
Get your account information first. You can then extract non-zero balances from here to get symbols for transactions. You can then loop through each currency pair and get its transaction history. This seems to be the most optimistic way we can get right now
You can also try to use caching. For example, you can remember balance for a particular coin, and if it has not changed by the next launch, then it is likely (but not 100%) that no transactions were made with it
You can also connect to WebSocket, but this is still a terrible crutch and requires a DOS attack to get the necessary data
Please note that here the balances for Savings wallet have LD prefix added to their ticker. For example, BTC in the Savings wallet is labeled as LDBTC

Downloading all transactions from Xero to reproduce General Ledger

I'm trying to use the Xero API to download all transactions to reproduce the general ledger in an external system so I can use it to reconcile figures within that system.
So far, I've got it downloading invoices, bank transactions, manual journals and credit notes, but it looks like bank transactions that are allocated as a payment against an invoice don't show up in the bank transactions API call. Is this correct or am I missing something?
If I do need to download Payments, there doesn't seem to be a paging method. Is this correct or am I missing something here?
Also, is there anything else that I need to download that might affect net movement on the general ledger?
Regarding the missing payments in bank transactions, this answer should help.
The Payments endpoint doesn't have paging according to the docs, just the If-Modified-Since header.
For our external system we started with the Journals endpoint (which should have everything that adjusts the GL) and supplemented it where needed with additional fields from other endpoints depending on the source type.

Rails: Using Paypal to faciliate marketplace transactions (parallel or chained?)

I want to build a marketplace site where my application connects a 'buyer' and a 'seller' and takes a commission (%) in the process.
I've checked out Adaptive payments API on Paypal and have seen 'parallel payments' as well as 'chained payments'.
However, what I would like to do is make it seem like the buyer is interacting directly with the seller, with my application taking a commission.
I know with parallel payments (Adaptive Payments API) it's possible for the 'sender' to see the 'primary recipient' which in this case would be the seller. In chained payments the buyer would see my application as the 'middle man' (and as the middle man I could take commission). So what I'm kind of looking for is something of a mix between the two. Any ideas?
My other idea is to use a parallel payment and have my application as the second recipient (taking % commission)?
How do marketplace sites do this? Any rails-specific tips would be much appreciated too - i've seen there is a Paypal Adaptive Gem which I could use?
I'm a rails noob and this is my first project.
Adaptive Payments allows you to separately specify who pays the fees and who the primary receiver is. In a chained payment flow, only the primary receiver is shown to the buyer.
In short; yes, Adaptive Payments will perfectly suit your needs.
You can get additional info from PayPal directly by filing a ticket with Developer Technical Services at https://www.paypal.com/dts/
Found this gem which let's you use Paypal's adaptive payments in your Rails application.
To make it seem like the buyer is interacting directly with the seller, I've discovered you need to do a 'chained payment' and specify the seller as the 'primary receiver'.
Your 'business/application' can take it's commission by acting as a secondary receiver. To do so you simply add it as a receiver but set :primary => false. When the buyer tries to make a purchase, it'll show the seller's Paypal email address so it looks like you're buying directly. Take a look at the documentation for the gem and you'll see it's pretty straightforward.
The amount sent by the buyer is split up between the receivers (which you can specify in your code). Hope this helps.

How to implement eCommerce susbscription service with multiple products

I've been researching eCommerce payment gateways and service offerings, but I'm an eCommerce novice, so please excuse my ignorance.
I wish to set up an eCommerce solution with the following requirements:
User "subscribes" to the service on a yearly basis. This service includes a single product subscription for a set amount (let's say $50/yr).
User can "subscribe" to additional product services for a lesser rate per year (let's say $25/yr).
I will need to store a product service unique Id of some sort for each product subscription the user subscribes to in order to show them product unique information. I also need to prevent duplicates...for example, user can subscribe to product ABC and XYZ, but not 2 of ABC.
Is PayPal the best solution for something like this? Is there a better solution? Any assistance is greatly appreciated, even if just links to specific tutorials or examples.
Update: It looks like Chargify could be the perfect solution.
You can also use Authorize.Net's CIM solution which, based on what I read at the chargify website, does most of what chargify does except your customers never need to leave your website. The Customer Information Manager allows you to create profiles for your members. These profiles store sensitive information like credit card numbers and billing information so you don't have to worry about PCI compliance or hackers stealing your information. You then can schedule a cron job to charge them monthly for whatever amount they owe based on their current subscription. Since you control when the payments happen it also allows you to charge them pro-rated amounts for subscription changes mid-month.
[link text][1] seems to be the best solution for me. I still need a merchant account, but this takes a lot of the headache out of handling the subscriptions.
[1]: http://chargify.com Chargify

Easiest way to sell stuff and track inventory

on my website I sell unique items. I have programmed it so that on the selling page, users can select any amount of these items, and it calculates the cost. The key is that I only have 1 of each of these items. So I need the shopping cart system to not allow the payment to go through unless it is available.
I've been searching for a good quick/easy/cheap solution and can't find one. I don't expect this site to make a lot of money (the transactions are a few bucks), so I didn't want to need a ssl certificate.
The only way I know of not needing an ssl certificate would be to use paypal or google checkout. However, I do not think there is a way of using these services and making paypal's server run a script to check how many are available on the site. Any solution?
Thanks
I was thinking about it more, and I think the problem is that once the user gets to the paypal payment screen, I have no control. I guess I could do something like they click the buy it now link, a php script updates it to sold, then they go to the paypal screen, but then they might not continue the purchase...
If you use PayPal Website Payments Standard (using a cart rather than 'Buy Now' Buttons) then you could use IPN or PDT (see the paypal docs here) to get PayPal to call back to you with the status of the payment.
The work flow would then be to set status to reserved when the item is added to the cart, and then wait for the IPN/PDT call to come back with the payment status, and mark the item as sold.
You would still need to check and reset to available any item that had been reserved for longer than say 2 Hours. (You could do this before serving a page to a user so that they have the latest availability and you don't need a cron job or long running process)
If you could provide a little more information about how you have implemented ur shopping card, it would have been more easier for other to assist! If you are using any ecommerce solution then it should be there already in the track inventory section. But Provided that you have implemented d shopping cart manually, why don't you add little bit of codes that checks the inventory status first before letting your customers check out?